package br.ufpe.cin.imlm2.util.filter;

import java.util.Collection;

public interface IFilter<T> {

	/**
	 * Tells whether or not this filter retains object <code>t</code>(i.e. if this filter will not allow this object to "pass").
	 * 
	 * @param t
	 * @return
	 */
	public abstract boolean retains( T t );

	/**
	 * Returns a collection containing only the objects not retained by this
	 * filter. An object will be retained if this filter <code>retains</code>
	 * method returns true. The returned collection may be a newly created one
	 * or the same parameter collection minus the filtered elements.
	 * 
	 * @param collection
	 * @return
	 */
	public abstract Collection<T> filter( Collection<T> collection );

}
